#{extends 'magicBox.html' /}
#{set title:'Requests' /}

#{list items:requests, as:'req'}
	<div class="bar">
			<a onclick="request_ignore('${req.id}', '${req.hash}');" href="#"><img src="/public/images/famfam/group_delete.png" title="Ignore request"></a><a onclick="request_accept('${req.id}', '${req.hash}');" href="#"><img src="/public/images/famfam/group_go.png" title="Grant role request"></a>
		${req.user.name} has  requested to be ${req.role.name}
	
	</div>
#{/list}
#{else}
	#{note 'error'}There are no new role requests#{/note}		
#{/else}

#{list items:drequests, as:'req'}
	<div class="bar">${req.user.name} has  requested to be deleted from the project.
	<a onclick="show_comment(${req.id});" href = "#"><img src="/public/images/famfam/group_delete.png" title="Ignore request"></a><a onclick="request_accept2(${req.id}, '${req.hash}');" href="#"><img src="/public/images/famfam/group_go.png" title="Accept request - remove from project"></a>
	<div id = "comment_${req.id}" style="display:none;">
		<br />
		Enter reason
		<input type="text" id="text_${req.id}"><br />
		<a onclick="do_ignore(${req.id}, '${req.hash}');" href="#">Decline request</a> (and notify user)
	</div>
	</div>
#{/list}
#{else}
	#{note 'error'}There are no new deletion requests#{/note}
#{/else}
#{list items:revrequests, as:'rev'}
	<div class="bar">${rev.user.name} has  requested to be reviewer for task type ${rev.taskType.name}.	
	<a onclick="review_request_respond('${rev.id}', 0);" href="#"><img src="/public/images/famfam/group_delete.png" title="Ignore request"></a><a onclick="review_request_respond('${rev.id}', 1);" href="#"><img src="/public/images/famfam/group_go.png" title="Grant role request"></a>
	</div>
#{/list}
#{else}
	#{note 'error'}There are no new reviewing requests#{/note}
#{/else}
